import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home'
import Search from '@/views/Search'
import Error404 from '@/views/404'
import RecSys from '@/views/RecSys'
import AutoQA from '@/views/AutoQA'
import Import from '@/views/Import'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/graph-search',
        name: 'Search',
        component: Search
    },
    {
        path: '/graph-import',
        name: 'Import',
        component: Import
    },
    {
        path: '/recsys',
        name: 'RecSys',
        component: RecSys
    },
    {
        path: '/autoqa',
        name: 'AutoQA',
        component: AutoQA
    },
    {
        path: '/404',
        name: '404',
        component: Error404
    },
    {
        path: '*',
        redirect: '/404'
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
